package java_test.reflection;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class ClassLoaderTest2 {
    public static void main(String[] args) throws IOException {
        Properties properties = new Properties();
//        FileInputStream fis = new FileInputStream("file\\text\\jdbc.properties");
//        properties.load(fis);
        ClassLoader classLoader = ClassLoaderTest2.class.getClassLoader();
        InputStream resourceAsStream = classLoader.getResourceAsStream("java_test/jdbc.properties");
        properties.load(resourceAsStream);
        String user = properties.getProperty("user");
        String password = properties.getProperty("password");
        System.out.println(user);
        System.out.println(password);
    }
}
